package com.cxs.handler.impl;

import com.cxs.handler.ResultHandler;
import com.cxs.utils.UnderlineToHumpCaseUtil;

import java.beans.PropertyDescriptor;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;

/**
 * @Project: jdbc
 * @Author: cxs2014501@163.com
 * @Create: 2022/8/31 15:34
 * @Description:
 **/
public class ResultBeanAsSingleHandler implements ResultHandler {

    @Override
    public Object resultHandle(ResultSet resultSet) {
        try {
            if (resultSet.next()) {
                return resultSet.getObject(1);
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
        return null;
    }
}
